// *Author：jxx
// *Contact：283591387@qq.com
// *代码由框架生成,任何更改都可能导致被代码生成器覆盖
export default function(){
    const table = {
        key: 'StockInId',
        footer: "Foots",
        cnName: '产品入库',
        name: 'StockIn',
        newTabEdit: false,
        url: "/StockIn/",
        sortName: "StockInId"
    };
    const tableName = table.name;
    const tableCNName = table.cnName;
    const newTabEdit = false;
    const key = table.key;
    const editFormFields = {"BillNo":"","BillDate":"","StockManagerId":"","DepartmentId":[],"Remark":""};
    const editFormOptions = [[{"title":"单据编号","field":"BillNo","type":"text"},
                               {"title":"单据日期","required":true,"field":"BillDate","type":"date"},
                               {"dataKey":"职员","data":[],"title":"仓管员","field":"StockManagerId","type":"select"},
                               {"dataKey":"部门级联","data":[],"title":"部门","required":true,"field":"DepartmentId","type":"cascader"}],
                              [{"title":"备注","field":"Remark","colSize":12,"type":"textarea"}]];
    const searchFormFields = {"BillNo":"","BillDate":""};
    const searchFormOptions = [[{"title":"单据编号","field":"BillNo","type":"like"},{"title":"单据日期","field":"BillDate","type":"date"}]];
    const columns = [{field:'StockInId',title:'产品入库标识',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'ProductTaskId',title:'生产任务标识',type:'int',bind:{ key:'生产任务单编号',data:[]},width:110,align:'left'},
                       {field:'BillNo',title:'单据编号',type:'string',link:true,width:120,align:'left'},
                       {field:'BillDate',title:'单据日期',type:'datetime',width:110,require:true,align:'left'},
                       {field:'StockManagerId',title:'仓管员',type:'int',bind:{ key:'职员',data:[]},width:80,align:'left'},
                       {field:'DepartmentId',title:'部门',type:'guid',bind:{ key:'部门级联',data:[]},width:110,require:true,align:'left'},
                       {field:'Remark',title:'备注',type:'string',width:220,align:'left'},
                       {field:'CreateID',title:'创建人标识',type:'int',width:80,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人名称',type:'string',width:100,align:'left'},
                       {field:'CreateDate',title:'创建日期',type:'datetime',width:110,align:'left'},
                       {field:'ModifyID',title:'修改人标识',type:'int',width:80,hidden:true,align:'left'},
                       {field:'Modifier',title:'修改人名称',type:'string',width:100,align:'left'},
                       {field:'ModifyDate',title:'修改日期',type:'datetime',width:110,align:'left'},
                       {field:'AuditDate',title:'审核日期',type:'datetime',width:110,align:'left'},
                       {field:'AuditStatus',title:'审核状态',type:'int',bind:{ key:'audit',data:[]},width:110,align:'left'},
                       {field:'AuditId',title:'审核人标识',type:'int',width:110,hidden:true,align:'left'},
                       {field:'Auditor',title:'审核人',type:'string',width:120,align:'left'},
                       {field:'ProductProcessReportId',title:'工序汇报单标识',type:'int',width:80,hidden:true,align:'left'},
                       {field:'OutsourceProcessReportId',title:'委外汇报单标识',type:'int',width:80,hidden:true,align:'left'},
                       {field:'ExternalDataId',title:'三方系统标识',type:'string',width:110,align:'left'}];
    const detail =  {
                    cnName: '入库明细',
                    table: 'StockInDetail',
                    columns: [{field:'StockInDetailId',title:'产品入库明细标识',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'StockInId',title:'产品入库标识',type:'int',width:110,hidden:true,require:true,align:'left'},
                       {field:'MaterialId',title:'物料标识',type:'int',width:110,hidden:true,require:true,align:'left'},
                       {field:'MaterialNo',title:'物料编码',type:'string',width:110,readonly:true,edit:{type:'text'},require:true,align:'left'},
                       {field:'MaterialName',title:'物料名称',type:'string',width:110,readonly:true,edit:{type:'text'},require:true,align:'left'},
                       {field:'Spec',title:'规格型号',type:'string',width:110,readonly:true,edit:{type:'text'},align:'left'},
                       {field:'Price',title:'入库成本',type:'decimal',width:110,edit:{type:'decimal'},align:'left'},
                       {field:'Qty',title:'入库数量',type:'decimal',width:110,edit:{type:'decimal'},require:true,align:'left'},
                       {field:'IsLoted',title:'启用批次',type:'int',bind:{ key:'是否',data:[]},width:80,require:true,align:'left'},
                       {field:'LotMasterDetailId',title:'批号明细标识',type:'int',width:80,hidden:true,align:'left'},
                       {field:'LotText',title:'批号',type:'string',width:110,edit:{type:''},align:'left'},
                       {field:'Amount',title:'成本金额',type:'decimal',width:110,readonly:true,edit:{type:'decimal'},align:'left'},
                       {field:'StockId',title:'仓库',type:'int',bind:{ key:'仓库new',data:[]},width:110,edit:{type:'select'},require:true,align:'left'},
                       {field:'LocationId',title:'仓位',type:'int',bind:{ key:'仓位',data:[]},width:110,edit:{type:'select'},align:'left'},
                       {field:'Remark',title:'备注',type:'string',width:180,edit:{type:'textarea'},align:'left'}],
                    sortName: 'StockInDetailId',
                    key: 'StockInDetailId'
                                            };
    const details = [];

    return {
        table,
        key,
        tableName,
        tableCNName,
        newTabEdit,
        editFormFields,
        editFormOptions,
        searchFormFields,
        searchFormOptions,
        columns,
        detail,
        details
    };
}